<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@include file="/includes.jsp"%>

<table class="layout" style="background-image: url(<html:rewrite page='/icons/user-32x32.png'/>);">
    <tr>
        <th class="layout">Name:</th>
        <td class="layout"><beans:write name="user" property="name"/></td>
    </tr>
    <tr>
        <th class="layout">Logins:</th>
        <td class="layout">
            <table class="styled" cellspacing="0">
                <tr>
                    <th class="styled">Login</th>
                    <th class="styled">Logout</th>
                    <th class="styled">Status</th>
                    <th class="styled">Remote Host</th>
                </tr>
                <logic:iterate name="logins" id="login">
                    <tr>
                        <td class="styled">
                            <beans:write name="login" property="loginTime" format="yyyy-MM-dd HH:mm:ss"/>&nbsp;
                        </td>
                        <td class="styled">
                            <logic:present name="login" property="logoutTime">
                                <beans:write name="login" property="logoutTime" format="yyyy-MM-dd HH:mm:ss"/>&nbsp;
                            </logic:present>
                            <logic:notPresent name="login" property="logoutTime">
                                online
                            </logic:notPresent>
                        </td>
                        <td class="styled">
                            <beans:write name="login" property="loginStatus"/>
                        </td>
                        <td class="styled">
                            <beans:write name="login" property="remoteHost"/>&nbsp;
                        </td>
                    </tr>
                </logic:iterate>
            </table>
        </td>
    </tr>
</table>
